package com.jack.ffmpeg_simple01

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.jack.ffmpeg_simple01.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {

    private lateinit var binding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        //去掉标题栏
//        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
//        //全屏，隐藏状态
//        getWindow().setFlags(
//            WindowManager.LayoutParams.FLAG_FULLSCREEN,
//            WindowManager.LayoutParams.FLAG_FULLSCREEN
//        )
//        requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE//存在报错
        //屏幕为横屏
//        setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE );

        binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)

        // Example of a call to a native method
        binding.sampleText.text = stringFromJNI()
    }

    external fun stringFromJNI(): String

    companion object {
        // Used to load the 'ffmpeg_simple01' library on application startup.
        init {
            System.loadLibrary("ffmpeg_simple01")
        }
    }
}